import {
  CouponOrderStatusEnum,
  MemberCouponDitchTypeEnum,
  MemberCouponIsDisplayEnum,
  MemberCouponPermissionsEnum,
  MemberCouponStatusEnum,
  MemberCouponTypeEnum,
} from '@/enums/memberCouponEnum';
import { ApplyTypeEnum } from '@/enums/membershipEnum';
import type { IQuery } from '../indexTypes';

export interface MemberCouponListData extends IQuery {
  keyWord: string;
}

export interface MemberCouponListResult {
  id: number;
  name: string;
  type: MemberCouponTypeEnum;
  display: MemberCouponIsDisplayEnum;
  couponNumber: number;
  assignNumber: number;
  usedNumber: number;
  validityStartTime: string;
  validityEndTime: string;
  createTime: string;
  leadingName: string;
  leadingAvatar: string;
  leadingSocialPosition: string;
  couponRole: MemberCouponPermissionsEnum;
  couponCover: string;
}

export interface ReceivedCouponResult {
  id: number;
  couponId: number
  couponName: string;
  couponCover: string;
  status: CouponOrderStatusEnum;
  leadingId: number;
  leadingName: string;
  socialPosition?: string;
  memberName?: string;
  companyName?: string;
  levelName?: string;
  createTime: string;
  validityStartTime: string;
  validityEndTime: string;
  verificationTime: string;
  verificationPersonName: string;
  verificationAppUserId: string;
  verificationCode: string;
  phone: string;
}

export interface MyCouponHistoryDetailsResult {
  id: number;
  name: string;
  memberId: number;
  type: MemberCouponTypeEnum;
  introduction: string;
  validityStartTime: string;
  validityEndTime: string;
  couponNumber: number;
  ditchType: MemberCouponDitchTypeEnum;
  couponRole: MemberCouponPermissionsEnum;
  memberLeveIds: string;
  orgIds: number;
  couponCover: string;
  explainUrl: string;
  orgIdList: number[];
  memberLeveIdList: number[];
}

export interface MemberCouponDetailsResult {
  id: number;
  name: string;
  type: MemberCouponTypeEnum;
  couponNumber: number;
  assignNumber: number;
  usedNumber: number;
  validityStartTime: string;
  validityEndTime: string;
  createTime: string;
  status: MemberCouponStatusEnum;
  couponCover: string;
  introduction: string;
  explainUrl: string;
  leadingId: number;
  leadingName: string;
  leadingAvatar: string;
  leadingSocialPosition: string;
  memberName: string;
  companyName: string;
  levelName: string;
  couponOrderStatus: CouponOrderStatusEnum;
  verificationCode: string;
  applyType: ApplyTypeEnum;
}

export interface MemberCouponAddData {
  name: string;
  type: MemberCouponTypeEnum;
  introduction: string;
  validityStartTime: string;
  validityEndTime: string;
  couponNumber: number;
  ditchType: MemberCouponDitchTypeEnum;
  couponRole: MemberCouponPermissionsEnum;
  memberLeveIdList: number[];
  couponCover: string;
  explainUrl: string;
}

export interface MemberCouponDisplayData {
  id: number;
  display: MemberCouponIsDisplayEnum;
}

export interface ReceiveCouponData {
  couponId: number;
  num?: number;
  isShare: boolean;
}

export interface CardMemberCouponListData extends IQuery {
  leadingId: number;
  isShare?: boolean;
}

export interface CardMemberCouponListResult {
  id: number;
  name: string;
  type: MemberCouponTypeEnum;
  couponNumber: number;
  assignNumber: number;
  usedNumber: number;
  validityStartTime: string;
  validityEndTime: string;
  createTime: string;
  status: MemberCouponStatusEnum;
  couponCover: string;
}

export interface AppUserCouponOrderMemberListData extends IQuery {
  /** 优惠卷ID */
  couponId?: number;
  /** 搜索关键词 */
  keyWord?: string;
  /** 优惠券状态 */
  status?: CouponOrderStatusEnum;
  /** 手机号 */
  phone?: string;
  /** 核销码 */
  verificationCode?: string;
}

export interface AppUserCouponOrderMemberListResult {
  id: number;
  couponName: string;
  couponCover: string
  status: CouponOrderStatusEnum;
  leadingAvatar: string
  leadingId: number;
  leadingName: string;
  socialPosition: string;
  memberName: string;
  companyName: string;
  levelName: string;
  createTime: string;
  validityStartTime: string;
  validityEndTime: string;
  verificationTime: string;
  verificationPersonName: string;
  verificationAppUserId: string;
}
